package com.bw.module_home.model.service

import com.bw.lib_net.RetrofitManager
import com.bw.lib_net.entity.ResponseEntity
import com.bw.module_home.model.api.VideoApi
import com.bw.module_home.model.entity.SimpleVideoEntity

/**
 * @Author : ZhouZiYao
 * @Time : On 2023/11/23 10:40
 * @Description :
 */
class VideoService {
    private val videoApi by lazy {
        RetrofitManager.instance.createService(VideoApi::class.java)
    }

    /**
     * 推荐视频
     */
    suspend fun getRecommendSimpleVideo(page: Int, pagesize: Int): ResponseEntity<MutableList<SimpleVideoEntity>> {
        return videoApi.getRecommendSimpleVideo(page, pagesize)
    }

    /**
     * 根据频道id获取视频列表
     */
    suspend fun getSimpleVideoByChannelId(channelId: String, page: Int, pagesize: Int): ResponseEntity<MutableList<SimpleVideoEntity>> {
        return videoApi.getSimpleVideoByChannelId(channelId, page, pagesize)
    }
}